package com.epam.lissina.entity;

import com.epam.lissina.enums.TypeOfTransport;

public abstract class Tour implements Comparable<Tour> {

	private TypeOfTransport transport;
	private double cost;
	private int countOfDays;

	public Tour(TypeOfTransport transport, double cost, int countOfDays) {
		if (cost < 0 || countOfDays < 0) {
			System.out.println("Incorrect data");
		}
		this.cost = cost;
		this.countOfDays = countOfDays;
		this.transport = transport;
	}

	public TypeOfTransport getTransport() {
		return transport;
	}

	public void setTransport(TypeOfTransport transport) {
		this.transport = transport;
	}

	public double getCost() {
		return cost;
	}

	public void setCost(double cost) {
		this.cost = cost;
	}

	public int getDays() {
		return countOfDays;
	}

	public void setDays(int days) {
		this.countOfDays = days;
	}

	@Override
	public int compareTo(Tour tour) {
		int result = this.transport.compareTo(tour.transport);
		return result;
	}

}
